#coding:utf-8


d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59 }
def generate_tr(name, score):
    if score<60:
        return '<tr><td>%s</td><td style="color:red">%s</td></tr>' % (name, score)
    else :
         return '<tr><td>%s</td><td>%s</td></tr>' % (name, score)

tds = [generate_tr(name, score) for name, score in d.items()]
print ('<table border="1">')
print ('<tr><th>Name</th><th>Score</th><tr>')
print ('\n'.join(tds))
print ('</table>')

#在 表达式总 for 后面添加if作为条件判断
nums=range(1,100,1)
print([x for x in nums if float(x)%5.0==0])

print ([x*100+y*10+z for x in range(1,10) for y in range(0,10) for z in range(0,10) if x==z])
